<?php

namespace app\common\twig;

/**
 * Created by PhpStorm.
 * User: zhanghua
 * Date: 2018/9/14
 * Time: 19:02
 */
class DlcTwigExtension extends \Twig_Extension
{
    public function getFunctions()
    {
        return array(
            new \Twig_SimpleFunction('url', [$this, 'url']), //生成url
        );
    }

    public function url($url = '', $vars = '', $suffix = true, $domain = false)
    {
        return url($url, $vars, $suffix, $domain);
    }


}

